package com.atguigu.spzx.common.exception;

import com.atguigu.spzx.model.vo.common.ResultCodeEnum;
import lombok.Data;

/**
 * ClassName: XiaoHeiException
 * Package:
 * Description:
 *
 * @Author:xiaohei
 * @Create 2024/5/17 9:53
 * Version 1.0
 */
@Data
public class XiaoHeiException extends RuntimeException {
    private Integer code;
    private String message;

    private ResultCodeEnum resultCodeEnum;

    public XiaoHeiException(ResultCodeEnum resultCodeEnum){
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
        this.resultCodeEnum = resultCodeEnum;
    }

}
